<!-- 用户列表 -->
<template>
    <div class="page-box h100 display-flex czbj">
        <p class="title-label">用户列表</p>
        <div class="mt10">
            <dxtable czWidth="240" :dataJson="dataJson" :formJson="formJson" :portUrl="portUrl" :qx="qx" ref="databale">
            </dxtable>
        </div>
    </div>
</template>
<script lang='ts' setup>
import dxtable from "./../../components/util/dxtable.vue";
import { h, ref, reactive } from "vue";
import sort from "../../components/util/sort.vue";
const initeer = () => {
    databale.value.initDataExpose();
};
const databale = ref();
// 弹窗公用该列表
let dataJson = reactive([
    {
        title: "姓名",
        key: "name",
        search: true, // 是否在搜索栏展示
    },
    {
        title: "电话号码",
        key: "phone",
        search: true, // 是否在搜索栏展示
    },{
        title: "总数量(桶)",
        key: "totalQuantity",
    }, {
        title: "排序",
        width: 100,
        render(row) {
            row.databaseName = "shuserList";
            return h(sort, {
                row,
                onCallBack: () => {
                    initeer();
                },
            });
        },
    },
    {
        title: "添加时间",
        key: "addTime",
        width: "140",
        type: "daterange",
    },
]);
const Userid = localStorage.id
let portUrl = "shbq/shuserList";
const qx = {
    DeletePermissionID: "shbquserListdel", //删除
    EditPermissionIdentifier: "shbquserListbj", // 编辑
    NewPermissionIdentifier: "shbquserListxz", // 新建
    ViewPermissionID: "shbquserListck", // 查看
};
let formJson = reactive([

    {
        title: "姓名",
        key: "name",
        type: "input",
        required: true,
    },
    {
        title: "电话号码",
        key: "phone",
        type: "input",
        yzlx: "phone",
        required: true,
    },{
        title: "总数量(桶)",
        key: "totalQuantity",
        type: "number",
        required: true,
    },
])
</script>


